﻿using System;
using RootMotion.FinalIK;

// Token: 0x02000153 RID: 339
internal class IKBlendData
{
	// Token: 0x060008AD RID: 2221 RVA: 0x00032850 File Offset: 0x00030A50
	public IKBlendData(IKEffector effector, FBIKChain chain, float speed)
	{
		this.effector = effector;
		this.chain = chain;
		this.speed = speed;
		this.rate = 0f;
		this.SetRate();
	}

	// Token: 0x060008AE RID: 2222 RVA: 0x00032880 File Offset: 0x00030A80
	public bool Update(float time)
	{
		bool result = false;
		this.rate += time * this.speed;
		if (this.rate >= 1f)
		{
			this.rate = 1f;
			result = true;
		}
		this.SetRate();
		return result;
	}

	// Token: 0x060008AF RID: 2223 RVA: 0x000328C8 File Offset: 0x00030AC8
	private void SetRate()
	{
		this.effector.positionWeight = this.rate;
		this.effector.rotationWeight = this.rate;
		this.chain.bendConstraint.weight = this.rate;
	}

	// Token: 0x060008B0 RID: 2224 RVA: 0x00032904 File Offset: 0x00030B04
	public bool Check(IKEffector effector, FBIKChain chain)
	{
		return this.effector == effector && this.chain == chain;
	}

	// Token: 0x04000845 RID: 2117
	private IKEffector effector;

	// Token: 0x04000846 RID: 2118
	private FBIKChain chain;

	// Token: 0x04000847 RID: 2119
	private float speed;

	// Token: 0x04000848 RID: 2120
	private float rate;
}
